home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libc6-i686.postrm < prev    next >
Encoding:
Text File  |  2009-08-31  |  1.9 KB  |  62 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. if [ "$1" = "remove" ]; then
  6.     # /etc/ld.so.nohwcap code: NOHWCAP
  7.     # Handle upgrades when libc-opt package has been installed.
  8.     # When a /etc/ld.so.nohwcap file exists, ld.so only use libraries
  9.     # from /lib, and ignore all optimised libraries. This file is
  10.     # inconditionaly created in the preinst script of libc.
  11.  
  12.     # Get the list of optimized packages for a given architecture
  13.     # Before removing a package from this list, make sure it appears
  14.     # in the Conflicts: line of libc.
  15.     case $(dpkg --print-architecture) in
  16.         alpha)
  17.             hwcappkgs="libc6-alphaev67"
  18.             ;;
  19.         armel)
  20.             hwcappkgs="libc6-vfp"
  21.             ;;
  22.         i386)
  23.             hwcappkgs="libc6-i686 libc6-xen"
  24.             ;;
  25.         kfreebsd-i386)
  26.             hwcappkgs="libc0.1-i686"
  27.             ;;
  28.         sparc)
  29.             hwcappkgs="libc6-sparcv9 libc6-sparcv9b libc6-sparcv9v libc6-sparcv9v2 libc6-sparc64b libc6-sparc64v libc6-sparc64v2"
  30.             ;;
  31.     esac
  32.  
  33.     # We check the version between the current installed libc and
  34.     # all optimized packages (on architectures where such packages
  35.     # exists).
  36.     all_upgraded=yes
  37.     if [ -n "$hwcappkgs" ]; then
  38.         for pkg in $hwcappkgs ; do
  39.             ver=$(dpkg -l $pkg 2>/dev/null | sed -e '/^i/!d;' -e "s/^i.\s\+$pkg\s\+//;s/\s.*//g")
  40.             if [ -n "$ver" ] && [ "$ver" != "2.9-4ubuntu6.1" ]; then
  41.                 all_upgraded=no
  42.             fi
  43.         done
  44.     fi
  45.  
  46.     # If the versions of all optimized packages are the same as the libc
  47.     # one, we could remove /etc/ld.so.nohwcap. Otherwise, it will be removed
  48.     # when all optimized packages are upgraded or removed.
  49.     if [ "$all_upgraded" = yes ] ; then
  50.         rm -f /etc/ld.so.nohwcap
  51.     fi
  52. fi
  53.  
  54. # Automatically added by dh_makeshlibs
  55. if [ "$1" = "remove" ]; then
  56.     ldconfig
  57. fi
  58. # End automatically added section
  59.  
  60.  
  61. exit 0
  62.